<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>普通消息</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/layui/css/layui.css"
	media="all" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resources/layui/layui.js"></script>
<style type="text/css">
textarea {
	resize: none !important;
	width: 550px !important;
	height: 150px !important;
}

#mydiv {
	margin-top: 30px !important;
}
</style>


<script>
layui.use(['form','layer','laydate','jquery','table','laytpl'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        laydate = layui.laydate,
        laytpl = layui.laytpl,
        table = layui.table;
    
    $(function(){
    	$("#sendText").click(function(){
    		var paramStr=$("#myForm").serialize();
    		$.get("/message/sendText",paramStr,function(res){
    			// console.debug(res.message)
    			layer.open({
					title: '温馨提示'
					,content: res.message
				});     
    		})
    	})
    })
});
</script>
</head>
<body>
	<blockquote class="layui-elem-quote layui-text">
		温馨提示：每个用户每个月只能接收四条推送的消息，请酌情进行消息推送！！！</blockquote>
	<div id="mydiv">
		<form class="layui-form" id="myForm">

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">编辑消息</label>
				<div class="layui-input-block">
					<textarea placeholder="请输入消息内容" class="layui-textarea"
						style="border-color: black;" name="content"></textarea>
				</div>

				<div class="layui-form-item" style="margin-top: 15px">
					<label class="layui-form-label">消息接收人</label>
					<div class="layui-input-block">
						<input name="users" title="今天的用户" type="radio" value="1">
						<input name="users" title="一周内的用户" type="radio" value="2">
						<input name="users" title="一个月内的用户" type="radio" value="3">
						<input name="users" title="全部" type="radio" value="4">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<a class="layui-btn" type="sumbit" id="sendText">立即提交</a>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>
</body>
</html>


